<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include "Nav.php";
include 'configs\config.php';
include 'sms_fun.php';

$namearr  = array('达令:','老公(老婆):','亲:','宝贝:','夫人(夫君):','相公(娘子):','亲爱的:','傻瓜:','笨蛋:','猪头:','公主(王子):','亲耐得:','孩子他爸(孩子他妈):','官人:','小心肝(小宝贝):','哥哥(妹妹):','老头子(老太婆):','媳妇:','蜜:');
//+++++++++++++++++++++++++++++++++++++++++++++++
//项目1配置:
$sqlfile      = "content_result\p1_sql.txt";
$contentfile  = "content_source\p1_sms_content.txt";
$typefile     = "content_source\p1_sms_type.txt";
//+++++++++++++++++++++++++++++++++++++++++++++++
//项目2配置:
//$sqlfile     = "content_result\p2_sql.txt";
//$contentfile = "content_source\p2_sms_content.txt";
//$typefile    = "content_source\p2_sms_type.txt";
//+++++++++++++++++++++++++++++++++++++++++++++++
//项目3配置:
//+++++++++++++++++++++++++++++++++++++++++++++++

$mysql = new mysql();
$mysql->open($config);
truncateSms($mysql);

deleteFile($sqlfile);
$type='type';
Main($mysql,$namearr,$typefile,$type);
Main($mysql,$namearr,$contentfile);

echo '========》》》随机精选内容开始<br/>';
for($i=0;$i<222;$i++)
{
	updateSms($mysql);
}
echo '========》》》随机精选内容结束<br/>';
createSql($mysql,$sqlfile);


unset($res);
unset($mysql);
?>